﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter03
{
    public class Code04
    {
        public static void Begin()
        {
            int var1, var2 = 5, var3 = 6;
            var1 = var2++ * --var3;
            Console.WriteLine("{0} {1}", var1, var2);
            Console.ReadLine();
            var var4 = 7;
            var1 += var2;
            var1 = var1 + var2;
            var1 = var2 + var3;
            var1 = var2 + var3 * var4;
            var1 = (var2 + var3) * var4;
        }

        public static void BeginEx02()
        {
            double firstNumber, secondNumber;
            string userName;
            Console.WriteLine("Enter your name:");
            userName = Console.ReadLine();
            Console.WriteLine("Welcome {0}!", userName);
            Console.WriteLine("Now give me a number:");
            firstNumber = Convert.ToDouble(Console.ReadLine());
            secondNumber = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Now sum of {0} and {1} is {2}", firstNumber, secondNumber, firstNumber + secondNumber);
            Console.WriteLine("The result of subtracting {0} form {1} is {2}.", secondNumber, firstNumber, firstNumber - secondNumber);
            Console.WriteLine("The product of {0} and {1} is {2}.", firstNumber, secondNumber, firstNumber * secondNumber);
            Console.WriteLine("The result of dividing {0} by {1} is {2}.", firstNumber, secondNumber, firstNumber / secondNumber);
            Console.WriteLine("The remaider after dividing {0} by {1} is {2}.", firstNumber, secondNumber, firstNumber % secondNumber);
            Console.ReadLine();
        }
    }

    namespace LevelOne
    {
        using LevelTwo;
        using ClassA2 = LevelTwo.LevelFour.ClassA;
        using ClassA3 = LevelThree.LevelFour.ClassA;

        public class ClassA
        {
            ClassA a1 = new ClassA();
            ClassA2 a2 = new ClassA2();
            ClassA3 a3 = new ClassA3();
        }


        namespace LevelTwo
        {
            namespace LevelFour
            {
                public class ClassA
                {

                }
            }
        }

        namespace LevelThree
        {
            namespace LevelFour
            {
                public class ClassA
                {

                }
            }
        }
    }
}
